package evolution.problem;

public abstract class AbstractMinimizationProblem implements
		OptimizationProblem {

	protected MinimizationFitnessFunction fitnessFunction = new MinimizationFitnessFunction(
			this);
	protected ProblemConstraints constraints;

	public AbstractMinimizationProblem(ProblemConstraints constraints) {
		this.constraints = constraints;
	}

	@Override
	public ProblemConstraints getConstraints() {
		return constraints;
	}

	@Override
	public void setConstraints(ProblemConstraints problemConstraints) {
		this.constraints = problemConstraints;
	}

	public MinimizationFitnessFunction getFitnessFunction() {
		return fitnessFunction;
	}

	public void setFitnessFunction(MinimizationFitnessFunction fitnessFunction) {
		this.fitnessFunction = fitnessFunction;
	}

	@Override
	public boolean isOptimumValueKnown() {
		return true;
	}

	@Override
	public double getOptimumValue() {
		return 0;
	}
}
